/**
 * 问题：
 * 链接：
 * 时间复杂度：O();
 * 空间复杂度：O();
 */
import java.util.*;
import java.io.*;


class tuopu {
        static int n;
        static int m;
        static Map<Integer,List<Integer>> edges = new HashMap<>();
        static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        public static void main(String[] args) throws IOException {

            //预处理
            n = br.read();m = br.read();
            int ret[] = new int[n + 1];

            //创建图
            for(int i = 0;i < m;i++){
                int a = br.read();int b = br.read();
                //如果不存在
                if(!edges.containsKey(a)){
                    edges.put(a,new ArrayList());
                }

                ret[b]++;

                //获取链表将b加入
                edges.get(a).add(b);
            }

            //2.拓扑排序
            Queue<Integer> q = new LinkedList<>();
            for(int i = 1;i <= n;i++){
                //查找0度点
                if(ret[i] == 0){
                    q.offer(ret[i]);
                }
            }

            //3.统计拓扑排序的结果
            int r[] = new int[n];
            int pos = 0;
            while(!q.isEmpty()){
                int x = q.poll();
                r[pos++] = x;

                for(int t : edges.getOrDefault(x,new ArrayList<>())){
                    ret[t]--;
                    if(ret[t] == 0){
                        r[pos++] = ret[t];
                    }
                }
            }



            //输出
            for(int i = 0;i < n - 1;i++){
                out.print(r[i] + " ");
            }
            out.println(r[n - 1]);

            out.close();
        }
    }

    class Test{


        static int n;
        static int m;
        static Map<Integer,List<Integer>> edges = new HashMap<>();
        static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        public static void main(String[] args) throws IOException{
            Scanner in = new Scanner(System.in);

            //预处理
            n = in.nextInt();m = in.nextInt();
            int ret[] = new int[n + 1];

            //创建图
            for(int i = 0;i < m;i++){
                int a = in.nextInt(),b = in.nextInt();
                //如果不存在
                if(!edges.containsKey(a)){
                    edges.put(a,new ArrayList());
                }

                ret[b]++;

                //获取链表将b加入
                edges.get(a).add(b);
            }

            //2.拓扑排序
            Queue<Integer> q = new LinkedList<>();
            for(int i = 1;i <= n;i++){
                //查找0度点
                if(ret[i] == 0){
                    q.offer(i);
                }
            }

            //3.统计拓扑排序的结果
            int r[] = new int[n];
            int pos = 0;
            while(!q.isEmpty()){
                int x = q.poll();
                r[pos++] = x;

                for(int t : edges.getOrDefault(x,new ArrayList<>())){
                    ret[t]--;
                    if(ret[t] == 0){
                       q.offer(t);
                    }
                }
            }

            //输出
            for(int i = 0;i < n - 1;i++){
                out.print(r[i] + " ");
            }
            out.println(r[n - 1]);

            out.close();
        }
    }

